From: Alexander Larsson Date: Thu, 9 Feb 2012 20:05:35 +0000 (+0100) Subject: Fix non-double-buffered drawing X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~18131 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=5d9736fe13fe0178c725cf7ff04ad188cd4d5d1b;p=gtk%2B3.0.git Fix non-double-buffered drawing There was a sign issue in a coordinate transform that made us flush the wrong region when flushing an implicit paint. The non-double buffered drawing would then be drawn over the right area, but then at the end of the implicit paint this would be overdrawn with the area we didn't properly remove from the implicit paint. Also, the translation from window coords to impl window coords is now done before removing any active double buffered paints, as these are also in impl window coords. --- diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 1a64f43cb4..1642424c67 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -2765,6 +2765,9 @@ gdk_window_flush_implicit_paint (GdkWindow *window) paint->flushed = TRUE; region = cairo_region_copy (window->clip_region_with_children); + cairo_region_translate (region, window->abs_x, window->abs_y); + cairo_region_intersect (region, paint->region); + /* Don't flush active double buffers, as that may show partially done * rendering */ for (list = window->paint_stack; list != NULL; list = list->next) @@ -2774,9 +2777,6 @@ gdk_window_flush_implicit_paint (GdkWindow *window) cairo_region_subtract (region, tmp_paint->region); } - cairo_region_translate (region, -window->abs_x, -window->abs_y); - cairo_region_intersect (region, paint->region); - if (!GDK_WINDOW_DESTROYED (window) && !cairo_region_is_empty (region)) { cairo_t *cr;